package com.niodata.dp.web.security;

import com.niodata.dp.core.context.Context;
import com.niodata.dp.core.usermgr.model.UserInfo;

public class DpContext implements Context {

  private DpUserDetails userDetails;

  public void set(DpUserDetails details) {
    this.userDetails = details;
  }

  @Override
  public UserInfo currentUser() {
    return userDetails.getUserInfo();
  }


  public DpUserDetails currentUserDetails() {
    return userDetails;
  }
}
